home *** CD-ROM | disk | FTP | other *** search
- #include "stdafx.h"
-
- cDripping::cDripping(int _x, int _y, cProperties *_orig)
- : cScenery(_x, _y, _orig)
- {
- ASSERT(orig->spot != 0);
-
- orig->get_sequence("MOVING", drip_seq);
- set_sequence(drip_seq, FALSE);
- }
-
- cDripping::~cDripping()
- {
- }
-
- int cDripping::control()
- {
- // Do nothing when in low detail mode
-
- if (low_detail_level)
- return TRUE;
-
- // Control
-
- cScenery::control();
-
- // Check if we fell onto something
-
- if (animation_done())
- {
- // Create drop
-
- ASSERT(orig->spot != 0);
-
- new cFallingScenery(x + orig->spot->x, y - orig->spot->y, water_drop);
-
- // Make dripping sound
-
- //new cEffect(x, y, orig, "DROP");
-
- // Restart sequence
-
- add_sequence(drip_seq);
-
- // Set image delay for first image in sequence
-
- set_image_delay(rnd(2 * sec));
- }
-
- return TRUE;
- }
-